# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Analytics.V3.Model.FilterExpression do
  @moduledoc """
  JSON template for an Analytics filter expression.

  ## Attributes

  *   `caseSensitive` (*type:* `boolean()`, *default:* `nil`) - Determines if the filter is case sensitive.
  *   `expressionValue` (*type:* `String.t`, *default:* `nil`) - Filter expression value
  *   `field` (*type:* `String.t`, *default:* `nil`) - Field to filter. Possible values:  
      - Content and Traffic  
      - PAGE_REQUEST_URI, 
      - PAGE_HOSTNAME, 
      - PAGE_TITLE, 
      - REFERRAL, 
      - COST_DATA_URI (Campaign target URL), 
      - HIT_TYPE, 
      - INTERNAL_SEARCH_TERM, 
      - INTERNAL_SEARCH_TYPE, 
      - SOURCE_PROPERTY_TRACKING_ID,   
      - Campaign or AdGroup  
      - CAMPAIGN_SOURCE, 
      - CAMPAIGN_MEDIUM, 
      - CAMPAIGN_NAME, 
      - CAMPAIGN_AD_GROUP, 
      - CAMPAIGN_TERM, 
      - CAMPAIGN_CONTENT, 
      - CAMPAIGN_CODE, 
      - CAMPAIGN_REFERRAL_PATH,   
      - E-Commerce  
      - TRANSACTION_COUNTRY, 
      - TRANSACTION_REGION, 
      - TRANSACTION_CITY, 
      - TRANSACTION_AFFILIATION (Store or order location), 
      - ITEM_NAME, 
      - ITEM_CODE, 
      - ITEM_VARIATION, 
      - TRANSACTION_ID, 
      - TRANSACTION_CURRENCY_CODE, 
      - PRODUCT_ACTION_TYPE,   
      - Audience/Users  
      - BROWSER, 
      - BROWSER_VERSION, 
      - BROWSER_SIZE, 
      - PLATFORM, 
      - PLATFORM_VERSION, 
      - LANGUAGE, 
      - SCREEN_RESOLUTION, 
      - SCREEN_COLORS, 
      - JAVA_ENABLED (Boolean Field), 
      - FLASH_VERSION, 
      - GEO_SPEED (Connection speed), 
      - VISITOR_TYPE, 
      - GEO_ORGANIZATION (ISP organization), 
      - GEO_DOMAIN, 
      - GEO_IP_ADDRESS, 
      - GEO_IP_VERSION,   
      - Location  
      - GEO_COUNTRY, 
      - GEO_REGION, 
      - GEO_CITY,   
      - Event  
      - EVENT_CATEGORY, 
      - EVENT_ACTION, 
      - EVENT_LABEL,   
      - Other  
      - CUSTOM_FIELD_1, 
      - CUSTOM_FIELD_2, 
      - USER_DEFINED_VALUE,   
      - Application  
      - APP_ID, 
      - APP_INSTALLER_ID, 
      - APP_NAME, 
      - APP_VERSION, 
      - SCREEN, 
      - IS_APP (Boolean Field), 
      - IS_FATAL_EXCEPTION (Boolean Field), 
      - EXCEPTION_DESCRIPTION,   
      - Mobile device  
      - IS_MOBILE (Boolean Field, Deprecated. Use DEVICE_CATEGORY=mobile), 
      - IS_TABLET (Boolean Field, Deprecated. Use DEVICE_CATEGORY=tablet), 
      - DEVICE_CATEGORY, 
      - MOBILE_HAS_QWERTY_KEYBOARD (Boolean Field), 
      - MOBILE_HAS_NFC_SUPPORT (Boolean Field), 
      - MOBILE_HAS_CELLULAR_RADIO (Boolean Field), 
      - MOBILE_HAS_WIFI_SUPPORT (Boolean Field), 
      - MOBILE_BRAND_NAME, 
      - MOBILE_MODEL_NAME, 
      - MOBILE_MARKETING_NAME, 
      - MOBILE_POINTING_METHOD,   
      - Social  
      - SOCIAL_NETWORK, 
      - SOCIAL_ACTION, 
      - SOCIAL_ACTION_TARGET,   
      - Custom dimension  
      - CUSTOM_DIMENSION (See accompanying field index),
  *   `fieldIndex` (*type:* `integer()`, *default:* `nil`) - The Index of the custom dimension. Set only if the field is a is CUSTOM_DIMENSION.
  *   `kind` (*type:* `String.t`, *default:* `analytics#filterExpression`) - Kind value for filter expression
  *   `matchType` (*type:* `String.t`, *default:* `nil`) - Match type for this filter. Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, or MATCHES. GEO_DOMAIN, GEO_IP_ADDRESS, PAGE_REQUEST_URI, or PAGE_HOSTNAME filters can use any match type; all other filters must use MATCHES.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :caseSensitive => boolean() | nil,
          :expressionValue => String.t() | nil,
          :field => String.t() | nil,
          :fieldIndex => integer() | nil,
          :kind => String.t() | nil,
          :matchType => String.t() | nil
        }

  field(:caseSensitive)
  field(:expressionValue)
  field(:field)
  field(:fieldIndex)
  field(:kind)
  field(:matchType)
end

defimpl Poison.Decoder, for: GoogleApi.Analytics.V3.Model.FilterExpression do
  def decode(value, options) do
    GoogleApi.Analytics.V3.Model.FilterExpression.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Analytics.V3.Model.FilterExpression do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
